import config from './config.js'
export default (url,data={},method="GET")=>{
	return new Promise((resolve,reject)=>{
		uni.request({
			url:config.baceUrl + url,
			data,
			method,
			
			success:res=>{
				resolve(res.data)
			},
			fail:err=>{
				console.log(err)
				reject(err.message)
			}
		})
	})
}